<?php
// 初期設定
if (!defined("IN_APP")) {
	define("IN_APP", true);
	include_once("../../include/init.php");
	requireLogin();
}

// タブ別の設定の読み込み
require_once("tab.include.php");

// ページ名
$page_name = "feature.tab";

/******************* ページの処理 *******************/

$connect = connectToDb();

$group_id = $_SESSION['group'];
$group_name = getGroupName($connect, $group_id);
$date = date("Y-m-d", time());

$query = "SELECT attendance_id FROM attendance WHERE group_id = {$group_id} AND date = '{$date}' ";
$query.= "AND (del_flag <> 'd' OR del_flag IS NULL)";

$result = mysql_query($query, $connect);

if (mysql_fetch_assoc($result)) {
	$attendance_check = "true";
	$feature_class = "";
}
else {
	$attendance_check = "false";
	$feature_class = "featureDisabled";
}

mysql_close($connect);

/******************** 処理終了 ********************/

// ページを表示する
$include_path = $SETTINGS['VIEW_PATH'] . $tab_name . "/" . $page_name . $SETTINGS['VIEW_NAME'];
include($include_path);

?>